package li.http;

/**
 * Https
 * 
 * @author li (limingwei@mail.com)
 * @version 1 (2013年12月16日 下午1:53:39)
 */
public class Https {
    public static String get(String url) {
        return getResponse(url).getBody();
    }

    public static Response getResponse(String url) {
        Request request = new Request();
        request.setUrl(url);
        return request.execute();
    }

    public static Response postResponse(String url, byte[] data) {
        Request request = new Request();
        request.setUrl(url);
        request.setData(data);
        return request.execute();
    }

    public static String post(String url, byte[] data) {
        return postResponse(url, data).getBody();
    }
}